<template>
  <div style="width: 100%; margin: 12px auto 0; height: 100%; background: #fff">
    <el-form
      @submit.native.prevent
      label-width="95px"
      v-loading="isLoading"
      style="margin: auto; width: 50%; padding: 20px"
    >
      <el-row>
        <el-col :span="12">
          <el-form-item label="资产编码:">{{ form.assetCode }}</el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="资产名称:"> {{ form.assetName }} </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="资产类型名称:">
            {{ form.categoryThirdName }}
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="厂家:"> {{ form.factoryName }} </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="操作系统:">
            {{ form.osVersionName }}
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="网络区域:">{{
            form.networkAreaName
          }}</el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="业务系统:">
            {{ form.businessCodeName }}
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="负责人:"> {{ form.userCode }} </el-form-item>
        </el-col>
        <!-- 
        <el-col :span="12">
          <el-form-item label="MAC地址:">{{ form.macAddress }} </el-form-item>
        </el-col> -->

        <el-col :span="12">
          <el-form-item label="管理地址:"> {{ form.managerIp }} </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="位置:">{{ form.position }}</el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="安全级别:">
            {{ form.passLevelName }}
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="重要性:">
            {{ form.importanceLevelName }}
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="保密性:">
            {{ form.secretLevelName }}
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
  </div>
</template>
<script>
import { infoAssets, queryTypeCode } from "@/api/analysisCenter/analysis";
export default {
  name: "information",
  components: {},
  props: {
    assetSourceEditId: {
      type: String,
      default: null,
    },
  },
  data() {
    return {
      isLoading: false,
      form: {},
    };
  },
  watch: {},
  computed: {},
  methods: {
    assetsData() {
      this.isLoading = true;
      infoAssets({ assetSourceId: this.assetSourceEditId })
        .then((res) => {
          if (res && res.code === 200) {
            this.form = res.data;
          } else {
            this.form = {};
          }
        })
        .finally(() => (this.isLoading = false));
    },
  },
  mounted() {
    this.assetsData();
  },
};
</script>

<style scoped lang="scss">
::v-deep .el-form-item {
  margin-bottom: 4px;
}
::v-deep .el-form-item__label {
  color: #606266;
}
::v-deep .el-form-item__content {
  color: #303133;
}
</style>
